//
//  UPLocationManager.h
//  Uang Pasti
//
//  Created by 李永彬 on 2025/8/17.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import <SystemConfiguration/CaptiveNetwork.h>
#import <NetworkExtension/NetworkExtension.h>

NS_ASSUME_NONNULL_BEGIN

@interface UPLocationManager : NSObject <CLLocationManagerDelegate>

+ (instancetype)sharedManager;

// 位置信息结构体
typedef struct {
    double latitude;
    double longitude;
    NSString * _Nullable countryCode;
    NSString * _Nullable country;
    NSString * _Nullable province;
    NSString * _Nullable city;
    NSString * _Nullable district;
    NSString * _Nullable street;
    NSString * _Nullable formattedAddress;
} UPLocationInfo;

// WiFi信息结构体
typedef struct {
    NSString * _Nullable ssid;
    NSString * _Nullable bssid;
    NSInteger signalStrength;
} UPWifiInfo;

// 请求定位权限
- (void)upRequestLocationPermissionWithCompletion:(void (^_Nullable)(BOOL granted))completion;

// 获取完整位置信息
- (void)upGetFullLocationInfoWithCompletion:(void (^_Nullable)(UPLocationInfo info))completion;

// 获取当前WiFi信息
- (void)upGetCurrentWifiInfoWithCompletion:(void (^_Nullable)(UPWifiInfo info))completion;

@end

NS_ASSUME_NONNULL_END
